//
// Created by 吴喆 on 2020/3/14.
//

#ifndef SUMMER_DEMOPLAYERSTATE_H
#define SUMMER_DEMOPLAYERSTATE_H


#import "../../engine/Playable.h"
#import "../../engine/ResourceManager.h"


class BirthState;

class StandState;

class RunState;

class JumpState;

class FallState;

class BirthState : public PlayableState {

public:
    PlayableState *handleInput(Playable &playable, KeyEvent *event) final;

    PlayableState *update(Playable &playable) final;

    void initAnimation() final;
};

class StandState : public PlayableState {
public:
    PlayableState *handleInput(Playable &playable, KeyEvent *event) final;

    PlayableState *update(Playable &playable) final;

    void initAnimation() final;

    void enter(Playable &playable) override;
};

class RunState : public PlayableState {
public:

    PlayableState *handleInput(Playable &playable, KeyEvent *event) final;

    PlayableState *update(Playable &playable) final;

    void initAnimation() final;

    void enter(Playable &playable) override;
};

class JumpState : public PlayableState {
public:

    PlayableState *handleInput(Playable &playable, KeyEvent *event) final;

    PlayableState *update(Playable &playable) final;

    void initAnimation() final;

    void enter(Playable &playable) final;
};

class FallState : public PlayableState {
public:

    PlayableState *handleInput(Playable &playable, KeyEvent *event) final;

    PlayableState *update(Playable &playable) final;

    void initAnimation() final;

    void enter(Playable &playable) override;
};

class DemoPlayerStateMachine : public StateMachine {
public:
    DemoPlayerStateMachine();

private:
    static DemoPlayerStateMachine *machine;
};

#endif //SUMMER_DEMOPLAYERSTATE_H
